package com.lupan.tomcatStudy.springCode.beanLoad;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 说明：
 *
 * @author lupan
 * @version 2017/6/9 10:08
 */
public class Main {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("springCode/beanLoad/spring-context.xml");
        Car car = (Car)context.getBean("car");
        CarBeanFactory carBeanFactory = (CarBeanFactory)context.getBean("&car");
        System.out.println("brand="+car.getBrand()+" and price="+car.getPrice());
    }
}
